﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Drawing;
using System.Windows.Media.Imaging;

namespace UofCASE.AgileProductLinerDSL {
    public class FolderTestIconConverter {
        private static readonly BitmapImage folderExp = new BitmapImage(new Uri("../../Images/VSFolder_open.png", UriKind.Relative));
        private static readonly BitmapImage folderColl = new BitmapImage(new Uri("../../Images/VSFolder_closed.png", UriKind.Relative));
        private static readonly BitmapImage test = new BitmapImage(new Uri("../../Images/HTMLPage.png", UriKind.Relative));

        public static BitmapImage GetImage(MappingTreeNode node) {
            if (node.IsFolder) {
                if (node.IsExpanded) {
                    return folderExp;
                } else return folderColl;
            } else return test;
        }
    }
    //public class FolderTestIconConverter : IValueConverter {
    //    private static readonly Bitmap folderOpen = VSPackage.VSFolder_open;
    //    private static readonly Bitmap folderClosed = VSPackage.VSFolder_closed;
    //    private static readonly Bitmap folderHTML = VSPackage.VSProject_html;


    //    //public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
    //    //    return (bool)value ? _user : _group;
    //    //}

    //    //public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
    //    //    throw new NotSupportedException();
    //    //}
    //}
}
